package com.wuyou.simple;


import java.util.HashSet;
import java.util.Set;

/**
 * 2357. 使数组中所有元素都等于零
 */
public class MinimumOperations {


    public int sol_1(int[] nums) {
        Set<Integer> set = new HashSet();
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] != 0) {
                set.add(nums[i]);
            }
        }
        return set.size();
    }
}
